package com.fifth.permission.controller.api;

import com.fifth.common.pojo.entity.Permission;
import com.fifth.permission.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @作者：刘壬杉
 * @创建时间 2022/8/31 12:12
 **/
@RestController
@RequestMapping("api/permission")
public class ApiPermissionController {
    @Autowired
    private PermissionService permissionService;

    @GetMapping("findByEmpid/{empid}")
    private List<String> findByEmpid(@PathVariable String empid){
        return permissionService.findByEmpid(empid);
    }

    //查询所有的权限
    @PostMapping("selectAllPermission")
    public List<Permission> selectAllPermission(){
        return permissionService.selectAllPermission();
    }

}
